package demo.spring.restful.domain;

public class Computer {
	private long id;
	private String brand;
	private String version;
	private String ram;
	private String screen;

	public Computer() {
		id = 0;
	}
	

	public Computer(long id, String brand, String version, String ram,
			String screen) {
		this.id = id;
		this.brand = brand;
		this.version = version;
		this.ram = ram;
		this.screen = screen;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getRam() {
		return ram;
	}

	public void setRam(String ram) {
		this.ram = ram;
	}

	public String getScreen() {
		return screen;
	}

	public void setScreen(String screen) {
		this.screen = screen;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Computer other = (Computer) obj;
		if (id != other.id)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Computer [id=" + id + ", brand=" + brand + ", version="
				+ version + ", ram=" + ram + ",screen=" + screen + "inch" + "]";
	}
}
